package com.android.dumiaogou.model.detail;

import com.android.dumiaogou.utils.MyLog;
import com.google.gson.Gson;
import com.zhy.http.okhttp.callback.Callback;

import okhttp3.Response;

/**
 * 自定义回调，每个bean都写一个
 * Created by wzq on 2016/9/1.
 */
public abstract class DirectBuySubmitOrderCallback extends Callback<DirectBuySubmitOrder> {

    @Override
    public DirectBuySubmitOrder parseNetworkResponse(Response response, int id) throws Exception {
        String string = response.body().string();
        MyLog.e("DirectBuySubmitOrder",string);
        DirectBuySubmitOrder data = new Gson().fromJson(string, DirectBuySubmitOrder.class);
     //   MyLog.e("DirectBuySubmitOrder1",data.getData().getOrder_sn());
        return data;
    }
}
